﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinFormsAppTest.Dao;
using WinFormsAppTest.pojo;

namespace WinFormsAppTest.Service
{
    internal class ChangeService
    {
        public List<Change> GetChanges()
        {
            ChangeDao changedao = new ChangeDao();
            List<Change> changes = changedao.GetChanges();
            return changes;
        }

        //根据用户id进行搜索
        public List<Change> GetChangeByUserId(int id)
        {
            ChangeDao changedao = new ChangeDao();
            List<Change> changes = changedao.GetChangeByUserId(id);
            return changes;
        }

        //根据变动id进行搜索
        public List<Change> GetChangeById(int id)
        {
            ChangeDao changedao = new ChangeDao();
            List<Change> changes = changedao.GetChangeById(id);
            return changes;
        }

        //根据变动类型搜索
        public List<Change> GetChangeByType(string type)
        {
            ChangeDao changedao = new ChangeDao();
            List<Change> changes = changedao.GetChangeByType(type);
            return changes;
        }
    }
}
